var status = -1;
var selectionLog = [];

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false, true);
            cm.updateInfoQuest(33213, "area=D1_Z05;x=4;y=2");
            cm.updateInfoQuest(33214, "ul=18287");
            cm.openUI(254);
            cm.setPartner(1, 1540732, 80001601, 0);
            cm.setPartner(1, 1540736, 80001602, 0);
            cm.setPartner(1, 1540737, 80001635, 0);
            cm.setPartner(1, 1540738, 80001615, 0);
            cm.setPartner(1, 1540739, 80001616, 0);
            cm.fieldEffect_InsertCanvas(1, 255, 0, 0, 0, 0, 0);
            cm.inGameDirectionEvent_AskAnswerTime(1200);
            cm.curNodeEventEnd(true);
            cm.spawnMobLimit(8240085, 1, 1036, -252, 1)
        } else {
            if (status === a++) {
                cm.fieldEffect_InsertCanvas(0, 0, 0, 0, 0, 1000, 0);
                cm.inGameDirectionEvent_AskAnswerTime(1400)
            } else {
                if (status === a++) {
                    cm.inGameDirectionEvent_AskAnswerTime(1200)
                } else {
                    if (status === a++) {
                        cm.inGameDirectionEvent_PushMoveInfo(0, 1500, 1050, -320)
                    } else {
                        if (status === a++) {
                            cm.sendNormalTalk_Bottom("请看那边！怪物脖子上挂的东西好像正是我们所需要的。", 37, 1540451, false, true)
                        } else {
                            if (status === a++) {
                                cm.inGameDirectionEvent_AskAnswerTime(3000)
                            } else {
                                if (status === a++) {
                                    cm.inGameDirectionEvent_PushMoveInfo(1, 1200, 0, 0)
                                } else {
                                    if (status === a++) {
                                        cm.setInGameDirectionMode(false, true, false);
                                        cm.dispose()
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};